//package com.qfedu.edu.config;
//
//import org.springframework.boot.SpringBootConfiguration;
//import org.springframework.context.annotation.Bean;
//import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;
//import org.springframework.security.config.annotation.web.configuration.WebSecurityConfiguration;
//import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
//import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
//
///**
// * @author xiaobobo
// * @title: SecuriityConfig
// * @projectName CD-Java-FY-2401-Springboot-Parent
// * @description: 通过配置的方式实现用户名和密码的设置
// * @date 2024/9/12  9:49
// */
//@SpringBootConfiguration  //表示的是一个配置文件
//public class SecurityConfig extends WebSecurityConfigurerAdapter {
//
//    @Override
//    protected void configure(AuthenticationManagerBuilder auth) throws Exception {
//        //在这里你就可以设置用户名和密码了
//        auth.inMemoryAuthentication().withUser("xiaobobo").password("$2a$10$oI2MhHvkzF0EC2fZMDBLieOA6jWOWy6kgBw9dDkiRq54spu6IGZJG").roles("admin");
//    }
//
//    @Bean
//    public BCryptPasswordEncoder bCryptPasswordEncoder(){
//       return new BCryptPasswordEncoder();
//    }
//}
//
//
